/* 覆盖全局样式 */
html, body {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh !important;
}

/* 只为 words learned 页面的特定样式 */
.wl-page {
    margin: 0;
    padding: 120px 0 100px 0;
    width: 100%;
    background: #141E30;
    display: block !important;
}

.wl-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #243B55;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    transition: margin-top 0.3s ease;
}

.wl-create-game-btn.active + .wl-container {
    margin-top: 20px;
}

.wl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    padding: 20px;
}

.wl-word-container {
    background: white;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: default;
}

.wl-word-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.wl-word-text {
    text-align: center;
    margin-bottom: 5px;
    color: #333;
}

.wl-status-container {
    display: flex;
    gap: 2px;
    height: 6px;
}

.wl-status {
    flex: 1;
    border-radius: 3px;
    position: relative;
}

/* Status colors */
.wl-spell-mastered, .wl-translate-mastered {
    background-color: #4CAF50;
}

.wl-spell-learning, .wl-translate-learning {
    background-color: #e09c09;
}

.wl-spell-struggling, .wl-translate-struggling {
    background-color: #ff0707;
}

.wl-spell-not-started, .wl-translate-not-started {
    background-color: #E0E0E0;
}

/* Tooltip styles */
.wl-status::after {
    content: attr(data-status);
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.wl-status:hover::after {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wl-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
        padding: 15px;
    }
    
    .wl-word {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}

.wl-header {
    text-align: center;
    
    margin-bottom: 10px;
}

.wl-header h1 {
    margin: 0;
}

.wl-create-game-btn {
    display: inline-block;
    width: 200px;
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    height: 0;
    margin: 0;
}

.wl-create-game-btn.active {
    opacity: 1;
    visibility: visible;
    height: auto;
    margin: 15px 0;
}

.wl-create-game-btn:hover {
    background-color: #45a049;
}

.wl-word-container.selected {
    background-color: #bbdefb;
    border: 2px solid #1976D2;
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(25, 118, 210, 0.3);
}

/* 添加 Toast 样式 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 16px 32px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}
